package com.study.pojo;

import java.util.Date;

/**
 * 章节的实体类
 * @Author Miss kun
 * @Date 2020/10/6 10:52
 * @Version 1.0
 */
public class Chapter {

    /**
     *章节的id
     */
    private Integer id;

    /**
     * 章节的标题
     */
    private String chapter_title;

    /**
     * 章节对应的书籍
     */
    private Integer book_id;

    /**
     * 章节对应的内容
     */
    private String chapter_content;

    /**
     * 章节创建的时间
     */
    private Date date;

/*    *//**
     * 实现链表查询，多对一（一本图书对应多个章节）
     *//*
    private Book book;*/

    public Chapter() {
    }

    public Chapter(String chapter_title, Integer book_id, String chapter_content) {
        this.chapter_title = chapter_title;
        this.book_id = book_id;
        this.chapter_content = chapter_content;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getChapter_title() {
        return chapter_title;
    }

    public void setChapter_title(String chapter_title) {
        this.chapter_title = chapter_title;
    }

    public Integer getBook_id() {
        return book_id;
    }

    public void setBook_id(Integer book_id) {
        this.book_id = book_id;
    }

    public String getChapter_content() {
        return chapter_content;
    }

    public void setChapter_content(String chapter_content) {
        this.chapter_content = chapter_content;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    @Override
    public String toString() {
        return "Chapter{" +
                "id=" + id +
                ", chapter_title='" + chapter_title + '\'' +
                ", book_id=" + book_id +
                ", chapter_content='" + chapter_content + '\'' +
                ", date=" + date +
                '}';
    }
}
